package org.hackystat.sdsa.analyzer.model.activity;

import jess.Fact;
import jess.JessException;
import jess.Rete;

/**
 * Defines the assertion interface to be implemented by the activities so that
 * we can assert them as facts to the working memory of the rule engine.
 * 
 * @author hongbing
 *
 */
public interface Assertable {
  /** Action index. */
  public static final String INDEX_SLOT = "index";
  /** Action file. */
  public static final String FILE_SLOT = "file";
  
  /**
   * Asserts this object to JESS's working memory.  
   * 
   * @param index Activity index. 
   * @param engine Rete engine.
   * @return The asserted fact.
   * @throws JessException If unexpected error happens.
   */
  Fact assertActivity(int index, Rete engine) throws JessException;
}
